package extras.salvation.api.methods;

import com.rsbuddy.script.methods.Game;

/**
 * @author Salvation
 * @version 1.0
 * @since 20-08-2011
 */
public final class ExtendedGame {

	private static final int CONNECTION_LOST = 14;
	private static final int CONNECTION_BEING_ESTABLISHED = 17;
	
	/**
	 * @author Salvation
	 * @return <tt>true</tt> if the connection is lost, otherwise <tt>false</tt>.
	 */
	public static boolean isConnectionLost() {
		return Game.getClientState() == CONNECTION_LOST;
	}

	/**
	 * @author Salvation
	 * @return <tt>true</tt> if the connection is being established, otherwise <tt>false</tt>.
	 */
	public static boolean isConnectionBeingEstablished() {
		return Game.getClientState() == CONNECTION_BEING_ESTABLISHED;
	}
}